package com.zhentao.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zhentao.pojo.Services;
import com.zhentao.service.ServicesService;
import com.zhentao.mapper.ServicesMapper;
import com.zhentao.vo.ServiceVO;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 服务项目Service实现类
 */
@Service
public class ServicesServiceImpl extends ServiceImpl<ServicesMapper, Services>
    implements ServicesService {

    @Resource
    private ServicesMapper servicesMapper;
    
    @Override
    public ServiceVO getServiceWithCategory(Long id) {
        return servicesMapper.getServiceWithCategory(id);
    }
    
    @Override
    public IPage<ServiceVO> pageServiceWithCategory(Page<Services> page) {
        return servicesMapper.pageServiceWithCategory(page);
    }
    
    @Override
    public List<ServiceVO> listServicesByCategoryId(Long categoryId) {
        return servicesMapper.listServicesByCategoryId(categoryId);
    }
}




